<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018-01-05
  Time: 14:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <script src="layui/layui.all.js"></script>

</head>
<html>
<body class="layui-collapse">

<div class="layui-colla-item">
    <h2 class="layui-colla-title">查询条件</h2>
    <div class="layui-colla-content layui-show">
        <div class="layui-tab">
            <ul class="layui-tab-title">
                <li class="layui-this">个人查询</li>
                <li>企业查询</li>
                <li>家庭查询</li>
                <li>其他查询</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <form class="layui-form" action="">

                        <div class="layui-form-item">

                            <div class="layui-row">
                                <div class="layui-col-md4">
                                    <label class="layui-form-label">姓名</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="username" required lay-verify="required"
                                               placeholder="请输入姓名" autocomplete="off" class="layui-input">
                                    </div>

                                </div>
                                <div class="layui-col-md4">
                                    <label class="layui-form-label">身份证号</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="certno" required lay-verify="required"
                                               placeholder="请输入身份证号" autocomplete="off" class="layui-input">
                                    </div>

                                </div>
                                <div class="layui-col-md4">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" lay-submit lay-filter="formPerson">立即提交</button>
                                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                    </div>

                                </div>

                            </div>
                        </div>
                    </form>
                </div>

                <div class="layui-tab-item">
                    <div class="layui-container">
                        <form class="layui-form" action="">
                            <div class="layui-form-item">
                                <div class="layui-row">
                                    <div class="layui-col-md6">
                                        <label class="layui-form-label">企业名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="coname" required lay-verify="required"
                                                   placeholder="请输入企业名称" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-col-md6">
                                        <div class="layui-input-block">
                                            <button class="layui-btn" lay-submit lay-filter="formCo">立即提交</button>
                                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </form>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <form class="layui-form" action="">

                        <div class="layui-form-item" id="firstone">

                            <div class="layui-row">
                                <div class="layui-col-md4">
                                    <label class="layui-form-label">姓名</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="username" required lay-verify="required"
                                               placeholder="请输入姓名" autocomplete="off" class="layui-input">
                                    </div>

                                </div>
                                <div class="layui-col-md4">
                                    <label class="layui-form-label">身份证号</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="certno" required lay-verify="required"
                                               placeholder="请输入身份证号" autocomplete="off" class="layui-input">
                                    </div>

                                </div>
                                <div class="layui-col-md4" >
                                    <div class="layui-btn-container" style="margin-left: 20px">
                                        <button class="layui-btn layui-btn-sm" id="addone">
                                            <i class="layui-icon">&#xe654;</i>
                                        </button>
                                    </div>
                                </div>
                            </div>


                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>


                    </form>
                </div>

                <div class="layui-tab-item">
                    <form class="layui-form" action="">

                        <div class="layui-form-item">

                            <div class="layui-row">
                                <div class="layui-col-md4">
                                    <label class="layui-form-label">产权证号</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="cqzh"
                                               placeholder="请输入产权证号" autocomplete="off" class="layui-input">
                                    </div>

                                </div>
                                <div class="layui-col-md4">
                                    <label class="layui-form-label">房屋坐落</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="location"
                                               placeholder="请输入房屋坐落" autocomplete="off" class="layui-input">
                                    </div>

                                </div>
                                <div class="layui-col-md4">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" lay-submit lay-filter="formOther">立即提交</button>
                                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                    </div>

                                </div>

                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="layui-colla-item">
    <h2 class="layui-colla-title">李清照</h2>
    <div class="layui-colla-content layui-show">内容区域</div>
</div>
<div class="layui-colla-item">
    <h2 class="layui-colla-title">鲁迅</h2>
    <div class="layui-colla-content layui-show">内容区域</div>
</div>
</div>

<script>
    var element = layui.element;
    var form = layui.form;
    var $ = layui.jquery;
    form.on('submit(formPerson)', function (data) {
        alert(123)
        layer.msg(JSON.stringify(data.field));
        return false;

    })
    $('#addone').click(function () {

        var appendStr="<div class=\"layui-row\">\n" +
            "                                <div class=\"layui-col-md4\">\n" +
            "                                    <label class=\"layui-form-label\">姓名</label>\n" +
            "                                    <div class=\"layui-input-inline\">\n" +
            "                                        <input type=\"text\" name=\"username\" required lay-verify=\"required\"\n" +
            "                                               placeholder=\"请输入姓名\" autocomplete=\"off\" class=\"layui-input\">\n" +
            "                                    </div>\n" +
            "\n" +
            "                                </div>\n" +
            "                                <div class=\"layui-col-md4\">\n" +
            "                                    <label class=\"layui-form-label\">身份证号</label>\n" +
            "                                    <div class=\"layui-input-block\">\n" +
            "                                        <input type=\"text\" name=\"certno\" required lay-verify=\"required\"\n" +
            "                                               placeholder=\"请输入身份证号\" autocomplete=\"off\" class=\"layui-input\">\n" +
            "                                    </div>\n" +
            "\n" +
            "                                </div>\n" +
            "                                <div class=\"layui-col-md4\" >\n" +
            "                                    <div class=\"layui-btn-container\" style=\"margin-left: 20px\">\n" +
            "                                        <button class=\"layui-btn layui-btn-sm deleteone\">\n" +
            "                                            <i class=\"layui-icon\">&#xe640;</i>\n" +
            "                                        </button>\n" +
            "                                    </div>\n" +
            "                                </div>\n" +
            "                            </div>";

        $("#firstone").append(appendStr)


    });
    
    $("#firstone").on("click",".deleteone",function () {
        alert(1234)
        $(this).closest(".layui-row").remove();

        
    })
</script>

</body>

</html>
